<button class="button"><span>Button</span></button>

<style>
/* From Uiverse.io by Bodyhc  - Tags: button, buttons, simple button, hover button, #button, 3d button, button hover effect , 2d button */
.button,
.button *,
.button :after,
.button :before,
.button:after,
.button:before {
  border: 0 solid;
  box-sizing: border-box;
}
.button {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: button;
  background-color: #000;
  background-image: none;
  color: #fff;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif,
    Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  font-size: 100%;
  font-weight: 900;
  line-height: 1.5;
  margin: 0;
  mask-image: -webkit-radial-gradient(#000, #fff);
  padding: 0;
  text-transform: uppercase;
}
.button:disabled {
  cursor: default;
}
.button:-moz-focusring {
  outline: auto;
}
.button svg {
  display: block;
}
.button [hidden] {
  display: none;
}
.button {
  border-radius: 99rem;
  border-width: 2px;
  overflow: hidden;
  padding: 0.8rem 3rem;
  position: relative;
}
.button span {
  mix-blend-mode: difference;
}
.button:after,
.button:before {
  background: linear-gradient(
    90deg,
    #fff 25%,
    transparent 0,
    transparent 50%,
    #fff 0,
    #fff 75%,
    transparent 0
  );
  content: "";
  inset: 0;
  position: absolute;
  transform: translateY(var(--progress, 100%));
  transition: transform 0.2s ease;
}
.button:after {
  --progress: -100%;
  background: linear-gradient(
    90deg,
    transparent 0,
    transparent 25%,
    #fff 0,
    #fff 50%,
    transparent 0,
    transparent 75%,
    #fff 0
  );
  z-index: -1;
}
.button:hover:after,
.button:hover:before {
  --progress: 0;
}

</style>
    